const scriptXssReg = /.*<script>.*<\/script>.*/i;

// 判断是否是XSS插入 <script> 标签
export const judgeScript = (content: string | string[]): boolean => {
  if (typeof content === 'string') {
    return scriptXssReg.test(content);
  } else {
    for (let i of content) {
      if (scriptXssReg.test(i)) {
        return true;
      }
    }
    return false;
  }
};
